<div class="am-g">
    <link rel="stylesheet" href="/assets/css/amazeui.datetimepicker.css" />
    <script type="text/javascript" src="/assets/js/amazeui.datetimepicker.min.js" ></script>
    <!-- Row start -->
    <div class="am-u-sm-12">
        <div class="card-box">
            <form action="" class="am-form" method="post" data-am-validator id="doc-vld-msg">
                <fieldset>
                    <div class="am-form-group">
                        <label>类别： </label>
                        <label class="am-radio-inline">
								        <input type="radio"  value="收入" name="Pcate" required>收入
								      </label>
                        <label class="am-radio-inline">
								        <input type="radio"  value="支出" name="Pcate">支出
								      </label>
                    </div>
                    <div class="am-form-group am-form-group-sm">
                        <label for="doc-vld-name-2">类别：</label>
                        <input type="text" name="Ptype" class="am-form-field" placeholder="如：销售收入 接待支出"/>
                    </div>
                    <div class="am-form-group am-form-group-sm">
                        <label for="doc-vld-name-2">来源去处：</label>
                        <input type="text" name="Pftmoney" class="am-form-field"/>
                    </div>
                    <div class="am-form-group am-form-group-sm">
                        <label for="doc-vld-name-2">金额：</label>
                        <input type="text" name="Pmoney" class="am-form-field"/>
                    </div>
                    <div class="am-form-group am-form-group-sm">
                        <label for="doc-vld-name-2">支付方式：</label>
                        <input type="text" name="Ppeyty" class="am-form-field"/>
                    </div>
                    
                    <div class="am-form-group">
                        <label>开票状态： </label>
                        <input type="text" name="Pfapiao" class="am-form-field"/>
                    </div>
                    <div class="am-form-group am-form-group-sm">
                        <label for="doc-vld-name-2">发票抬头：</label>
                        <input type="text" name="Pfptitle" class="am-form-field"/>
                    </div>
                    <div class="am-form-group am-form-group-sm">
                        <label for="doc-vld-name-2">时间：</label>
                        <input type="text" name="Ptime"size="16" value="" readonly class="form-datetime-lang am-form-field"/>
                    </div>
                    <div class="am-form-group am-form-group-sm">
                        <label for="doc-vld-name-2">经办人：</label>
                        <input type="text" name="Pname" class="am-form-field"/>
                    </div>
                    <div class="am-form-group am-form-group-sm">
                        <label for="doc-vld-name-2">备注：</label>
                        <input type="text" name="Pmarkte" class="am-form-field"/>
                    </div>
                    <button class="am-btn am-btn-secondary" type="button">提交</button>
                </fieldset>
            </form>


        </div>
    </div>
    <!-- Row end -->
</div>
</div>
</div>
<script>

    (function($){
  // 也可以在页面中引入 amazeui.datetimepicker.zh-CN.js
  $.fn.datetimepicker.dates['zh-CN'] = {
    days: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六", "星期日"],
    daysShort: ["周日", "周一", "周二", "周三", "周四", "周五", "周六", "周日"],
    daysMin:  ["日", "一", "二", "三", "四", "五", "六", "日"],
    months: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
    monthsShort: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
    today: "今日",
    suffix: [],
    meridiem: ["上午", "下午"]
  };

  $('.form-datetime-lang').datetimepicker({
    language:  'zh-CN',
    format: 'yyyy-mm-dd'
  });
}(jQuery));

    $(".am-btn").click(function(){
        $.post("/finance/add",$("form").serializeArray(),function(data){
            if(data.status==1){
                 if (confirm("添加成功,是否继续添加财务记录？")) {
                     window.location.reload();
                 }else{
                     window.location.href=data.url;
                 }
            }else{
                alert(data.msg);
            }
        })
    });

</script>